home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Gobby 0.4.7 / gobby-0.4.7.exe / {app} / share / gtksourceview-2.0 / language-specs / ini.lang < prev    next >
Extensible Markup Language  |  2008-09-09  |  3KB  |  95 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Antonio Ognio <gnrfan@gnrfan.org>
  5.  Copyright (C) 2005 Antonio Ognio <gnrfan@gnrfan.org>
  6.  
  7.  This library is free software; you can redistribute it and/or modify
  8.  it under the terms of the GNU General Public License as published by
  9.  the Free Software Foundation; either version 2 of the License, or
  10.  (at your option) any later version.
  11.  
  12.  This program is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  GNU General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU General Public License
  18.  along with this program; if not, write to the Free Software
  19.  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20.  
  21. -->
  22. <language id="ini" _name=".ini" version="2.0" _section="Others">
  23.   <metadata>
  24.     <property name="mimetypes">text/x-ini-file;application/x-ini-file</property>
  25.     <property name="globs">*.ini</property>
  26.     <property name="line-comment-start">;</property>
  27.   </metadata>
  28.  
  29.   <styles>
  30.     <style id="comment" _name="Comment" map-to="def:comment"/>
  31.     <style id="floating-point" _name="Floating Point" map-to="def:floating-point"/>
  32.     <style id="string" _name="String" map-to="def:string"/>
  33.     <style id="keyword" _name="Keyword" map-to="def:keyword"/>
  34.     <style id="decimal" _name="Decimal" map-to="def:decimal"/>
  35.     <style id="variable" _name="Variable" map-to="def:type"/>
  36.     <style id="non-standard-key" _name="Data Type" map-to="def:type"/>
  37.     <style id="boolean-value" _name="Boolean value" map-to="def:boolean"/>
  38.   </styles>
  39.  
  40.   <definitions>
  41.     <context id="line-comment" style-ref="comment" end-at-line-end="true">
  42.       <start>;</start>
  43.     </context>
  44.     <context id="group" style-ref="keyword">
  45.       <start>^\[</start>
  46.       <end>\]$</end>
  47.     </context>
  48.     <context id="non-standard-key" style-ref="non-standard-key">
  49.       <match>^_?X\-[a-zA-Z\-]+</match>
  50.     </context>
  51.     <context id="language" style-ref="decimal">
  52.       <match>\[[a-zA-Z_]+\]</match>
  53.     </context>
  54.     <context id="variable" style-ref="variable">
  55.       <match>^[a-zA-Z_][a-zA-Z0-9_.]*</match>
  56.     </context>
  57.     <context id="boolean-value" style-ref="boolean-value">
  58.       <keyword>true</keyword>
  59.       <keyword>false</keyword>
  60.       <keyword>on</keyword>
  61.       <keyword>off</keyword>
  62.       <keyword>yes</keyword>
  63.       <keyword>no</keyword>
  64.     </context>
  65.     <context id="single-quoted-string" style-ref="string">
  66.       <start>'</start>
  67.       <end>'</end>
  68.     </context>
  69.     <context id="double-quoted-string" style-ref="string">
  70.       <start>"</start>
  71.       <end>"</end>
  72.     </context>
  73.     <context id="integer" style-ref="decimal">
  74.       <match>\b[0-9]+\b</match>
  75.     </context>
  76.     <context id="decimal-number" style-ref="floating-point">
  77.       <match>(\b[0-9]+(\.[0-9]+)?|\.[0-9]+)([Ee][\+-]?[0-9]+)?\b</match>
  78.     </context>
  79.     <context id="ini">
  80.       <include>
  81.         <context ref="line-comment"/>
  82.         <context ref="group"/>
  83.         <context ref="non-standard-key"/>
  84.         <context ref="language"/>
  85.         <context ref="variable"/>
  86.         <context ref="boolean-value"/>
  87.         <context ref="single-quoted-string"/>
  88.         <context ref="double-quoted-string"/>
  89.         <context ref="decimal-number"/>
  90.         <context ref="integer"/>
  91.       </include>
  92.     </context>
  93.   </definitions>
  94. </language>
  95.